@import 'variables.scss';

:root {
  // 主题颜色
  --theme-color: #{$themeColor};
  // 后台主题颜色
  --backend-theme-color: #{$backendThemeColor};
  // 后台菜单栏active颜色
  --backend-active-color: #{$backendActiveColor};
  // 后台父级菜单背景色
  --backend-parent-color: #{$backendParentColor};
  // 按钮实体化效果
  --reality-shadow: #{$realityShadow};
  //背景色
  --bg-color: #{$bgColor};
  // 后台背景色
  --backend-bg-color: #{$backendBgColor};
  // 头部高度
  --header-height: #{$headerHeight};
  // 布局宽度
  --main-wrapper: #{$wrapperWidth};
}

#app {
  width: 100%;
  background-color: var(--bg-color);
}

*,
:before,
:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:focus-visible {
  outline: none;
}

.content-wrapper {
  margin: 0 auto;
  min-width: $wrapperWidth
}

.main-wrapper {
  margin: 0 auto;
  width: $wrapperWidth
}

.middle-wrapper {
  margin: 0 auto;
  width: $middleWrapper !important;
}

.design-wrapper {
  margin: 0 auto;
  width: $designWrapper
}

.max-wrapper {
  margin: 0 auto;
  width: $maxWrapper
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-justify-between {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.otw-common {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

//  1-10行溢出显示...
@for $i from 1 through 10 {
  .otw-#{$i} {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $i;
    -webkit-box-orient: vertical;
  }
}

.backend-title {
  color: #414141;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 16px;
  border-bottom: 1px solid #F4F4F4;
}

.link-text {
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  color: #5897DB;

  &:hover {
    color: #a0cfff;
  }
}

/* 滚动条优化 谷歌，火狐 */
::-webkit-scrollbar-track-piece {
  background-color: #fff;
  border-radius: 0;
  -webkit-border-radius: 0
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px
}

::-webkit-scrollbar-thumb {
  height: 10px;
  background-color: rgba(144, 147, 153, .5);
  border-radius: 24px;
  -webkit-border-radius: 24px;
  outline: 1px solid #fff;
  outline-offset: -1px;
  border: 1px solid #fff;
  -moz-opacity: 0.5;
  -khtml-opacity: 0.5;
  opacity: 0.5
}

::-webkit-scrollbar-thumb:hover {
  height: 10px;
  background-color: rgba(144, 147, 153, .5);
  border-radius: 24px;
  -webkit-border-radius: 24px
}

* {
  scrollbar-color: rgba(144, 147, 153, .5) #fff;
  /* 滑块颜色  滚动条背景颜色 */
  scrollbar-width: thin;
  /* 滚动条宽度有三种：thin、auto、none */
}

@font-face {
  font-family: 'PingFang SC-Medium';
  src: url('/fonts/PingFangSC-Medium.otf') format('truetype');
}

@font-face {
  font-family: 'PingFang SC-Regular';
  src: url('/fonts/PingFangSCRegular.woff2.ttf') format('truetype');
}

body {
  font-family: 'PingFang SC-Medium', 'PingFang SC-Regula', sans-serif;
}